package com.cljz.makepassenger.ui.holder;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.cljz.makepassenger.base.App;
import com.cljz.makepassenger.R;
import com.cljz.makepassenger.model.net.bean.InviteDetailBean;
import com.squareup.picasso.Picasso;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import de.hdodenhof.circleimageview.CircleImageView;

/**
 * Created by apple on 2017/4/10.
 */

public class PersonListHolder extends RecyclerView.ViewHolder {
    @BindView(R.id.civ_portrait)
    CircleImageView civPortrait;
    @BindView(R.id.tv_nickname)
    TextView tvNickname;

    public PersonListHolder(View itemView) {
        super(itemView);
        ButterKnife.bind(this, itemView);

    }

    public void setData(List<InviteDetailBean.DataBean.InviteBean.MemberBean> personList, int position) {
        Picasso.with(App.getInstance()).load(personList.get(position).getUser_logo()).error(R.mipmap.head_loading).placeholder(R.mipmap.head_loading).into(civPortrait);
        tvNickname.setText(personList.get(position).getUser_nickname());
    }
}
